Make local dev setup seamless with pnpm setup#723
Open
285729101 wants to merge 1 commit intoMerit-Systems:masterfrom
Open
Make local dev setup seamless with pnpm setup#723285729101 wants to merge 1 commit intoMerit-Systems:masterfrom
285729101 wants to merge 1 commit intoMerit-Systems:masterfrom
Conversation
- add scripts/setup.sh that checks prereqs, generates .env files with working defaults, starts postgres, and runs prisma migrations - add 'pnpm setup' script to root package.json - rewrite README dev section with clear step-by-step instructions, troubleshooting guide, and useful commands reference - improve .env.example files with better comments and notes - update control's setup.sh to generate a complete working .env - update CONTRIBUTING.md getting started to point to pnpm setup closes Merit-Systems#597
Contributor
|
@285729101 is attempting to deploy a commit to the Merit Systems Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
@fmhall ready for review when you have time. Tested the setup script on a fresh clone — goes from zero to running in one command. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #597
Tried running echo locally from a fresh clone and ran into a few friction points — no .env files get generated with working defaults, the setup instructions in the README are pretty minimal, and there's no single command to go from clone to working dev environment. This PR fixes all of that.
What changed
scripts/setup.sh— new script that handles the full local bootstrap: checks prereqs (node, pnpm, docker), generates.envfiles for both control and server with working local defaults, spins up postgres via docker compose, and runs prisma migrations. Wired up aspnpm setupin root package.json.README — rewrote the Development section with a proper step-by-step guide, prerequisites table, what-gets-started overview, troubleshooting tips, and useful commands reference.
.env.examplefiles — cleaned up both control and server examples with better comments explaining what's optional vs required for local dev.packages/app/control/scripts/setup.sh— updated to generate a complete.envinstead of just AUTH_SECRET + DATABASE_URL.CONTRIBUTING.md — updated Getting Started to point to
pnpm setupinstead of the old multi-step manual process.How to test
Should just work on any machine with node 18+, pnpm, and docker installed.